/******************************************************************************
 * @File name   :      IMaintainDealerEmployeeService.java
 *
 * @Author      :      chenggong jiang
 *
 * @Date        :      2011-6-21
 *
 * @Copyright Notice: 
 * Copyright (c) 2014 DMS, Inc. All  Rights Reserved.
 * This software is published under the terms of the DMS Software
 * License version 1.0, a copy of which has been included with this
 * distribution in the LICENSE.txt file.
 * 
 * 
 * ----------------------------------------------------------------------------
 * Date                   Who                 Version        Comments
 * 2011-6-21 下午01:40:22 chenggong jiang     1.0            Initial Version
 *  2011-9-27 下午17:52:37    pxwu     1.1          update method validateCertificateCode
 *****************************************************************************/
package com.cap.bts.framework.dm.employeemgnt.service;

import java.io.IOException;
import java.util.List;

import com.cap.bts.framework.common.exception.AppException;
import com.cap.bts.framework.common.service.IBaseService;
import com.cap.bts.framework.dm.approval.dto.UserAccountApprovalDto;
import com.cap.bts.framework.dm.employeemgnt.dto.MaintainEmployeeResultDto;
import com.cap.bts.framework.dm.employeemgnt.dto.MaintainEmployeeSubmitDto;
import com.cap.bts.framework.usermgnt.domain.User;
import com.cap.bts.framework.usermgnt.dto.ApprovalSubmitDto;
import com.cap.bts.framework.usermgnt.dto.QueryEmployeeDto;

/**
 *账号自动生成服务接口
 */
public interface IMaintainDealerEmployeeService extends IBaseService {
    
    /**
     * 创建相关账号岗位信息以及账号组织信息，并更新EmployeeInfo数据
     * @Date        :      2011-6-21
     * @param userAccountApprovalDto
     * @return
     * @throws AppException
     */
    public boolean syncEmployeeByApprovalResult(UserAccountApprovalDto userAccountApprovalDto,int operationType) throws AppException;
    
    /**
     * 根据queryEmployeeDto得到List<MaintainEmployeeResultDto>
     * @Date        :      2011-6-27
     * @param queryEmployeeDto QueryEmployeeDto 
     * @return List<MaintainEmployeeResultDto> 
     */
    public List<MaintainEmployeeResultDto> getMaintainDealerEmployeeByDto(QueryEmployeeDto dto) throws AppException;

    public boolean saveEmployee(MaintainEmployeeSubmitDto employeeSubmitDto, User user, Long dealerId, String dealerCode) throws AppException,IOException;
   
    /**
     * 根据employeeId得到相应的MaintainEmployeeSubmitDto
     * @Date        :      2011-6-29
     * @param employeeId long  
     * @return MaintainEmployeeSubmitDto 
     */
    public MaintainEmployeeSubmitDto getMaintainDealerEmployeeById(long employeeId) throws AppException;
    
     /**
      * 更新人员信息
      * @Date        :      2011-6-29
      * @param employeeSubmitDto
      */
     public void saveOrUpdateEmployeeInfoByDto(MaintainEmployeeSubmitDto employeeSubmitDtoo, User operator, String dealerCode) throws AppException, IOException;
    
    /**
     * 更新人员组织和岗位信息
     * @Date        :      2011-6-29
     * @param employeeSubmitDto MaintainEmployeeSubmitDto
     * @throws AppException 
     */
     public void saveOrUpdateUsrGrpAndOrgByDto(MaintainEmployeeSubmitDto employeeSubmitDto, User operator, Long dealerId, String dealerCode) throws AppException;
    
     /**
      * 删除人员信息
      * @Date        :      2011-6-29
      * @param employeeId long 
      * @throws AppException 
      */
     public void deleteEmployee(long employeeId) throws AppException;

     /**
      * 验证身份证号
      * @Date        :      2011-9-27
      * @param certificateCode  String
     * @param certificateType TODO
      * @return String
      * @throws AppException
      */
     public String  validateCertificateCode(String certificateCode, Long certificateType) throws AppException;
      

     
     
     
    /**
     * reset password
     * @Date        :      2011-10-18
     * @param userCode String
     * @param currentUser User
     * @throws AppException
     */
     public void resetpassword(String userCode,  User currentUser) throws AppException;
     
     


	/**
	 * validate certificate code for update
	 * @Date        :      Aug 8, 2012
	 * @param certificateCode
	 * @param certificateType
	 * @param userCode
	 * @return
	 * @throws AppException
	 */
	public boolean validateCertificateCodeForUpdate(String certificateCode,
			Long certificateType, String userCode) throws AppException;
    /**
     * 
     * @param submitDto
     * @throws AppException 
     */
	public void approveUserGroupApplication(ApprovalSubmitDto submitDto) throws AppException;
  
}
